-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[misc] Remove deprecated Python APIs #3725
[misc] Remove deprecated Python APIs #3725
Conversation
✔️ Deploy Preview for jovial-fermat-aa59dc canceled. 🔨 Explore the source changes: c36d9fd 🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/61af4eca35001d0008c336f1 |
b0b24c1
to
d78cdfa
Compare
I think I have fixed most things so far. Please take a look @alizhang @k-ye :) BTW, as for other repos, I'm not sure whether it's really necessary to manually check their dependence on deprecated APIs:
So I just fixed two important ones (as mentioned by @k-ye), while leaving other repos as they are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!!
|
||
|
||
func() | ||
ti.dot(x, x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this file was used to demo the deprecated warning message. Shall well remove it then? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, as I have removed the deprecated APi (transposed
), this demo would break. So I just picked another deprecated API (yes, there're still some more APIs to deprecate in the codebase and they are not included in this PR) for the demo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha I see, makes sense! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ailzhang Do we need another issue for other deprecated APIs not covered here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glad to help if we're going to remove all remaining deprecated APIs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@izackwu awesome thanks! Would you mind opening an issue as well? Thanks a lot!
This PR tries to remove all these deprecated Python APIs and it resolves #3590.
Before merging, we need to make sure all these APIs...
@deprecated('kernel_profiler_print()', 'print_kernel_profile_info()')
@deprecated('kernel_profiler_clear()', 'clear_kernel_profile_info()')
@deprecated('memory_profiler_print()', 'print_memory_profile_info()')
@deprecated('ti.cache_shared', 'ti.block_local')
@deprecated('ti.var', 'ti.field')
@deprecated("ti.indices", "ti.axes")
@deprecated('ti.Matrix.transposed(a)', 'a.transpose()')
@deprecated('a.T()', 'a.transpose()')
@deprecated('ti.Matrix.var', 'ti.Matrix.field')
@deprecated('ti.Vector.var', 'ti.Vector.field')
@deprecated('x(i, j)', 'x.get_scalar_field(i, j)')
@deprecated('_bit_struct', 'bit_struct')
@deprecated('_bit_array', 'bit_array')
@deprecated('x.data_type()', 'x.dtype')
@deprecated('x.dim()', 'len(x.shape)')
@deprecated('x.shape()', 'x.shape')
@deprecated('x.get_shape(i)', 'x.shape[i]')
@deprecated('ti.vec(x, y)', 'ti.core_vec(x, y)')
@deprecated('ti.veci(x, y)', 'ti.core_veci(x, y)')
@deprecated('gui.has_key_pressed()', 'gui.get_event()')
...can be safely deleted by checking other repos under Taichi including
This PR will follow such steps: